package model.camera;

import model.decoder.ZXingQRDecoder;
import android.hardware.Camera;
import android.hardware.Camera.Size;

public class CameraPreviewCallback implements Camera.PreviewCallback 
{
	@Override
	public void onPreviewFrame(byte[] bytes, Camera camera) 
	{
		Size previewSize = camera.getParameters().getPreviewSize();
		
		new ZXingQRDecoder(previewSize).execute(bytes);
//		new ZBarDecoder(previewSize).execute(bytes);
//		new ZXing1DDecoder(previewSize).execute(bytes);
	}
}